const mongoose = require("mongoose");

const addressesSchema = new mongoose.Schema({
    name: String, //收件人姓名
    phone: String,  //收件人联系电话
    address: String,  //收件人地址
    // 所属用户 id
    userId:{
        type: mongoose.Schema.Types.ObjectId,
        ref: 'usersModel'
    },
    isuse:{type:Boolean,default:true},
})

mongoose.model("addressesModel", addressesSchema, "addresses");